import 'package:json2dart_safe/json2dart.dart';

class BloggerFansGroupModel {
  String? createdAt;
  int? fansGroupNum;
  bool? fansMember;
  String? groupAnno;
  int? groupId;
  String? groupName;
  int? monthTicketPrice;
  int? seasonTicketPrice;
  int? userId;
  int? yearTicketPrice;

  BloggerFansGroupModel({
    this.createdAt,
    this.fansGroupNum,
    this.fansMember,
    this.groupAnno,
    this.groupId,
    this.groupName,
    this.monthTicketPrice,
    this.seasonTicketPrice,
    this.userId,
    this.yearTicketPrice,
  });

  Map<String, dynamic> toJson() {
    return Map<String, dynamic>()
      ..put('createdAt', this.createdAt)
      ..put('fansGroupNum', this.fansGroupNum)
      ..put('fansMember', this.fansMember)
      ..put('groupAnno', this.groupAnno)
      ..put('groupId', this.groupId)
      ..put('groupName', this.groupName)
      ..put('monthTicketPrice', this.monthTicketPrice)
      ..put('seasonTicketPrice', this.seasonTicketPrice)
      ..put('userId', this.userId)
      ..put('yearTicketPrice', this.yearTicketPrice);
  }

  BloggerFansGroupModel.fromJson(Map<String, dynamic> json) {
    this.createdAt = json.asString('createdAt');
    this.fansGroupNum = json.asInt('fansGroupNum');
    this.fansMember = json.asBool('fansMember');
    this.groupAnno = json.asString('groupAnno');
    this.groupId = json.asInt('groupId');
    this.groupName = json.asString('groupName');
    this.monthTicketPrice = json.asInt('monthTicketPrice');
    this.seasonTicketPrice = json.asInt('seasonTicketPrice');
    this.userId = json.asInt('userId');
    this.yearTicketPrice = json.asInt('yearTicketPrice');
  }

  static BloggerFansGroupModel toBean(Map<String, dynamic> json) =>
      BloggerFansGroupModel.fromJson(json);
}
